package com.ruixi.spring.usermod;

import com.ruixi.spring.usermod.controller.UserController;
import com.ruixi.spring.usermod.dao.UserDaoImpl;
import com.ruixi.spring.usermod.service.impl.UserServiceImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("conf/applicationContext.xml");
        UserController userController = ac.getBean("aaa", UserController.class);
        System.out.println(userController);

        UserServiceImpl userServiceImpl = ac.getBean("userServiceImpl", UserServiceImpl.class);
        System.out.println(userServiceImpl);

        UserDaoImpl userDaoImpl = ac.getBean("userDaoImpl", UserDaoImpl.class);
        System.out.println(userDaoImpl);



        userController.addUser();
    }
}
